<template>
	<view class="timelineItem">
		<view class="timeItem">
			<view class="leftTime" v-if="leftTime != 'false'" :style="{background: bgColor == '' ? '' : bgColor , color: color == '' ? '' : color}">
				{{leftTime}}
			</view>
            <view class="kong" v-if="leftTime == 'false'" style="width:30rpx;"></view>
			<view class="line">
				<view class="out" :style="{background: color == '' ? '' : color}">
					<view class="inner" style="background: white"></view>
				</view>
			</view>
			<view class="rightContent">
				<slot></slot>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		props:{
			leftTime:{
				type:String,
				default:''
			},
			color:{
				type:String,
				default:''
			},
			bgColor:{
				type:String,
				default:''
			}
		},
		data(){
			return {
				
			}
		}
	}
</script>

<style scoped lang="less">
	.timelineItem {
		.timeItem {
			display: flex;
			.leftTime {
				margin-right: 30rpx;
				width:160rpx;
				height:88rpx;
				background:rgba(242,245,243,1);
				border-radius:44rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size:32rpx;
				font-family:PingFang SC;
				font-weight:400;
				color:rgba(0,199,89,1);
			}
			.line {
				width: 1px;
				// background:rgba(204,204,204,1);
				border-left: 1rpx dashed #E6EAEE;
				position: relative;
				.out {
					position: absolute;
					top: 12%;
					left: 40%;
					transform: translateX(-50%);
					display: flex;
					justify-content: center;
					align-items: center;
					width: 28rpx;
					height: 28rpx;
					background : #00C759;
					border-radius: 50%;
					.inner {
						width: 12rpx;
						height: 12rpx;
						border-radius: 50%;
					}
				}
			}
			.rightContent {
				flex: 1;
				padding: 0 10rpx 80rpx;
				margin-left: 20rpx;
				min-height: 50rpx;
			}
		}
	}
</style>
